import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _applyDecoratedDescriptor from "@babel/runtime/helpers/esm/applyDecoratedDescriptor";
var _excluded = ["record"];

var _dec, _class;

import React from 'react';
import { Checkbox } from 'antd';
import { Bind } from 'lodash-decorators';
var RecordCheckbox = (_dec = Bind(), (_class = /*#__PURE__*/function (_React$Component) {
  _inherits(RecordCheckbox, _React$Component);

  var _super = _createSuper(RecordCheckbox);

  function RecordCheckbox() {
    _classCallCheck(this, RecordCheckbox);

    return _super.apply(this, arguments);
  }

  _createClass(RecordCheckbox, [{
    key: "handleClick",
    value: function handleClick() {
      var _this$props = this.props,
          record = _this$props.record,
          onClick = _this$props.onClick;
      onClick(record);
    }
  }, {
    key: "render",
    value: function render() {
      var _this$props2 = this.props,
          record = _this$props2.record,
          rest = _objectWithoutProperties(_this$props2, _excluded);

      return /*#__PURE__*/React.createElement(Checkbox, Object.assign({}, rest, {
        onClick: this.handleClick
      }));
    }
  }]);

  return RecordCheckbox;
}(React.Component), (_applyDecoratedDescriptor(_class.prototype, "handleClick", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, "handleClick"), _class.prototype)), _class));
export { RecordCheckbox as default };